import { _axios } from '@/utils/request'
// 查询员工信息
export const sysuser = (params) => {
  return _axios({
    url: '/sys/user',
    params
  })
}
// 获取员工基本信息
export const sysuserGet = (id) => {
  return _axios({
    url: `/sys/user/${id}`
  })
}
// 新增员工信息
export const sysuserPost = (data) => {
  return _axios({
    url: '/sys/user',
    method: 'post',
    data
  })
}
// 删除员工
export const sysuserDelete = (id) => {
  return _axios({
    url: `/sys/user/${id}`,
    method: 'delete'

  })
}
// 批量导入员工
export const sysuserbatch = (data) => {
  return _axios({
    url: '/sys/user/batch',
    method: 'post',
    data
  })
}
// 跟新员工信息
export const sysuserPut = (data) => {
  return _axios({
    url: `/sys/user/${data.id}`,
    method: 'PUT',
    data
  })
}
// 保存员工个人信息
export const employeesipersonalInfo = (data) => {
  return _axios({
    url: `/employees/${data.id}/personalInfo`,
    method: 'PUT',
    data
  })
}
// 获取员工信息
export const employeespersonalInfo = (id) => {
  return _axios({
    url: `/employees/${id}/personalInfo`
  })
}
// 保存员工信息
export const employeespersonalInfoPut = (data) => {
  return _axios({
    url: `/employees/${data.userId}/personalInfo`,
    method: 'put',
    data
  })
}
// 获取员工岗位信息
export const employeesjobs = (id) => {
  return _axios({
    url: `/employees/${id}/jobs`
  })
}
// 保存员工岗位信息
export const employeesjobsPut = (data) => {
  return _axios({
    url: `/employees/${data.userId}/jobs`,
    method: 'put',
    data
  })
}

